package com.dangdang.spel.rest;

public class RestfulDto {

	private int code;
	private Object body;
	private String message;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public Object getBody() {
		return body;
	}
	public void setBody(Object body) {
		this.body = body;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public RestfulDto(int code, Object body, String message) {
		super();
		this.code = code;
		this.body = body;
		this.message = message;
	}
	public RestfulDto(int code, String message) {
		super();
		this.code = code;
		this.message = message;
	}
	
	public static RestfulDto successed() {
		return new RestfulDto(200, "成功");
	}
	public static RestfulDto failed(String message) {
		return new RestfulDto(500, message);
	}
}
